﻿using System.Collections.Generic;
using Shuba.Model;

namespace Shuba.Business
{
    public class Branch
    {
        private Data.Branch branch;

        public Branch()
        {
            branch = new Data.Branch();
        }

        public List<BranchInfo> GetBranchRelation(string BranchID)
        {
            return branch.GetDependency(BranchID);
        }
		  
		public List<BranchInfo> GetList()
        {
            return branch.GetList("");
        }

        public List<BranchInfo> GetListByRegionAndCluster(string RegionID, string ClusterID, string Nip, string AppID)
        {
            return branch.GetListByRegionAndCluster(RegionID, ClusterID, Nip, AppID);
        }

        public List<BranchInfo> GetListByRegionAndCluster(string RegionID, string ClusterID)
        {
            return branch.GetListByRegionAndCluster(RegionID, ClusterID);
        }

        public List<BranchInfo> GetListByBranchID(string BranchID)
        {
            return branch.GetListByBranchID(BranchID);
        }

        public List<BranchInfo> GetListByHO(string HO_ID, string REGIONAL_ID, string CLUSTER_ID)
        {
            return branch.GetListByHO(HO_ID, REGIONAL_ID, CLUSTER_ID);
        }

        public List<BranchInfo> GetListByRegion(string REGIONAL_ID, string CLUSTER_ID)
        {
            return branch.GetListByRegion(REGIONAL_ID, CLUSTER_ID);
        }

        public List<BranchInfo> GetListByCluster(string CLUSTER_ID)
        {
            return branch.GetListByCluster(CLUSTER_ID);
        }

        public BranchInfo GetApprovalByID(string id)
        {
            return branch.GetApprovalByID(id);
        }

        public List<BranchInfo> GetList(string value)
        {
            return branch.GetList(value);
        }

        public List<BranchInfo> GetListApproval(string value, string UpdateBy)
        {
            return branch.GetListApproval(value, UpdateBy.TrimEnd());
        }

        public BranchInfo Get(string id)
        {
            return branch.Get(id);
        }

        public void Save(BranchInfo branchInfo)
        {
            branch.Save(branchInfo);
        }
  
        public void Approve(string BranchId, string ActType)
        {
            branch.Approve(BranchId, ActType);
        }

        public void Reject(string BranchId)
        {
            branch.Reject(BranchId);
        }
    }
}
